package com.yixuan.mt.common.entity;

import com.yixuan.mt.common.constant.BucketsConstant;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;
import lombok.Data;
import org.hibernate.validator.constraints.Range;

import java.time.LocalDateTime;

@Data
public class Bucket {
    private Integer id;
    @NotEmpty(message = "桶名不能为空！")
    @Size(max = BucketsConstant.BUCKET_NAME_MAX_LENGTH, message = "桶名长度不能超过20！")
    private String name;
    @NotNull(message = "访问策略不能为空！")
    @Range(min = BucketsConstant.BUCKET_ACCESS_POLICY_PUBLIC, max = BucketsConstant.BUCKET_ACCESS_POLICY_PRIVATE, message = "访问策略取值范围为0-1！")
    private Integer accessPolicy;
    private String createdTime;
}
